CMAKe_MINIMUM_REQUIRED(VERSION 3.4.0)

PROJECT(RedMudStoveSvg)
include_directories(ui)
# include_directories(ui)
include_directories(ui/components/controlclass/createsvgbutton)
include_directories(ui/components/controlclass/createxmindbutton)
include_directories(ui/components/controlclass/createpdfbutton)
include_directories(ui/components/controlclass/serchlineedit)
include_directories(ui/components/controlclass/taskbutton)
include_directories(ui/components/controlclass/topcreatebuttontipswidget)
include_directories(ui/components/controlclass/colorbarwidget)
include_directories(ui/components/controlclass/colorbutton)
include_directories(ui/components/controlclass/drawtoolswidget)
include_directories(ui/components/controlclass/svgpropertywidget)
include_directories(ui/components/controlclass/progressbar)
include_directories(ui/components/controlclass/svgtopfunctionwidget)
include_directories(ui/components/controlclass/drawtoolswidget)
include_directories(ui/components/controlclass/ploygonbutton)
include_directories(ui/components/controlclass/colorslidbarwidget)
include_directories(ui/components/controlclass/colordialog)
include_directories(ui/components/controlclass/ploygonbutton/polygonselectwidget)
include_directories(ui/components/controlclass/colorvalueinput)
include_directories(ui/components/workstationwidget)
include_directories(ui/components/topwidget)
include_directories(ui/components/controlwidget/)
include_directories(ui/components/controlclass/graphicsprocess/*)
include_directories(ui/components/controlclass/graphicsprocess/canvaspropertywidget)
include_directories(ui/components/controlclass/svgtoolswidget)
include_directories(ui/components/selectshape)
include_directories(res)
include_directories(kernel)
include_directories(kernel/shape)
include_directories(kernel/shapeedit)
include_directories(ui/components/startloadpage/)
# add_subdirectory(ui)
# add_subdirectory(kernel)
# add_subdirectory(res)
SET(CMAKE_INCLUDE_CURRENT_DIR ON)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
SET(CMAKE_AUTOMOC ON)
SET(CMAKE_AUTOUIC ON)
SET(CMAKE_AUTORCC ON)
FIND_PACKAGE(Qt5Widgets)
FIND_PACKAGE(Qt5Core)
FIND_PACKAGE(Qt5Gui)
FILE(GLOB SRC_FILES
    *.cpp
    ui/*.cpp
	kernel/shapeedit/*.cpp
    kernel/shape/*.cpp
	ui/components/startloadpage/*.cpp
    ui/components/selectshape/*.cpp
    ui/components/controlclass/graphicsprocess/svgcanvaspropertywidget/*.cpp
    ui/components/controlclass/slidbutton/*.cpp
    ui/components/controlclass/slidlabel/*.cpp
    ui/components/controlclass/graphicsprocess/svgdrawarearuler/*.cpp
    ui/components/controlclass/graphicsprocess/svgcanvas/*.cpp
    ui/components/controlclass/graphicsprocess/svgsketchpad/*.cpp
    ui/components/controlclass/graphicsprocess/canvaspropertywidget/*.cpp
    ui/components/controlclass/svgtoolswidget/*.cpp
    ui/components/controlclass/progressbar/*.cpp
    ui/components/controlclass/graphicsprocess/shapestrokewidget/*.cpp
    ui/components/controlclass/graphicsprocess/shapeshadewidget/*.cpp
    ui/components/controlclass/graphicsprocess/shapeparameterwidget/*.cpp
    ui/components/controlclass/graphicsprocess/shapeobscurewidget/*.cpp
    ui/components/controlclass/graphicsprocess/shapefunctionwidget/*.cpp
    ui/components/controlclass/graphicsprocess/shapefillwidget/*.cpp
    ui/components/controlclass/graphicsprocess/shapealignwidget/*.cpp
    ui/components/controlclass/graphicsprocess/shapeappearancewidget/*.cpp
    ui/components/controlclass/colorvalueinput/*.cpp
    ui/components/controlclass/colordialog/*.cpp
    ui/components/controlclass/ploygonbutton/polygonselectwidget/*.cpp
    ui/components/controlclass/colorslidbarwidget/*.cpp
    ui/components/controlclass/ploygonbutton/*.cpp
    ui/components/controlclass/svgpropertywidget/*.cpp
    ui/components/controlclass/drawtoolswidget/*.cpp
    ui/components/controlclass/svgtopfunctionwidget/*.cpp
    ui/components/controlclass/colorbarwidget/*.cpp
    ui/components/controlclass/colorbutton/*.cpp
    ui/components/controlclass/createsvgbutton/*.cpp
    ui/components/controlclass/drawtoolswidget/*.cpp
    ui/components/controlclass/createpdfbutton/*.cpp
    ui/components/controlclass/createxmindbutton/*.cpp
    ui/components/controlclass/topcreatebuttontipswidget/*.cpp
    ui/components/controlclass/serchlineedit/*.cpp
    ui/components/workstationwidget/*.cpp
    ui/components/controlclass/taskbutton/*.cpp
    ui/components/controlclass/topwidget/*.cpp
    ui/components/controlwidget/*.cpp
    ui/components/topwidget/*.cpp
    kernel/*.cpp
    res/*.cpp
    )
FILE(GLOB HEAD_FILES
    *.h
    ui/*.h
    kernel/shape/*.h
	kernel/shapeedit/*.h
	ui/components/startloadpage/*.h
    ui/components/selectshape/*.h
    ui/components/controlclass/graphicsprocess/svgcanvaspropertywidget/*.h
    ui/components/controlclass/slidlabel/*.h
    ui/components/controlclass/slidbutton/*.h
    ui/components/controlclass/graphicsprocess/svgdrawarearuler/*.h
    ui/components/controlclass/graphicsprocess/svgcanvas/*.h
    ui/components/controlclass/graphicsprocess/svgsketchpad/*.h
    ui/components/controlclass/graphicsprocess/canvaspropertywidget/*.h
    ui/components/controlclass/svgtoolswidget/*.h
    ui/components/controlclass/progressbar/*.h
    ui/components/controlclass/graphicsprocess/shapestrokewidget/*.h
    ui/components/controlclass/graphicsprocess/shapeshadewidget/*.h
    ui/components/controlclass/graphicsprocess/shapeparameterwidget/*.h
    ui/components/controlclass/graphicsprocess/shapeobscurewidget/*.h
    ui/components/controlclass/graphicsprocess/shapefunctionwidget/*.h
    ui/components/controlclass/graphicsprocess/shapefillwidget/*.h
    ui/components/controlclass/graphicsprocess/shapeappearancewidget/*.h
    ui/components/controlclass/graphicsprocess/shapealignwidget/*.h
    ui/components/controlclass/colorvalueinput/*.h
    ui/components/controlclass/colorslidbarwidget/*.h
    ui/components/controlclass/colordialog/*.h
    ui/components/controlclass/ploygonbutton/*.h
    ui/components/controlclass/ploygonbutton/polygonselectwidget/*.h
    ui/components/controlclass/svgpropertywidget/*.h
    ui/components/controlclass/drawtoolswidget/*.h
    ui/components/controlclass/svgtopfunctionwidget/*.h
    ui/components/controlclass/colorbarwidget/*.h
    ui/component/controlclass/colorbutton/*.h
    ui/component/controlclass/drawtoolswidget/*.h
    ui/components/workstationwidget/*.h
    ui/components/controlclass/createsvgbutton/*.h
    ui/components/controlclass/createxmindbutton/*.h
    ui/components/controlclass/createpdfbutton/*.cpp
    ui/components/controlclass/serchlineedit/*.h
    ui/components/controlclass/taskbutton/*.h
    ui/components/controlclass/topcreatebuttontipswidget/*.h
    ui/components/topwidget/*.h
    ui/components/controlwidget/*.h
    kernel/*.h
    res/*.h
    )
FILE(GLOB UI_FILES
    *.ui
    ui/*.ui
    res/*.ui
    kernel/*.ui
    )
FILE(GLOB_RECURSE QRC_SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.qrc)
set(GLOB QRC_SOURCE_FILES rcc.qrc)
qt5_wrap_ui(WRAP_FILES ${UI_FILES})
QT5_ADD_RESOURCES(QRC_FILES ${QRC_SOURCE_FILES} )
    #将ui文件和生成文件整理在一个文件夹中，非必须
source_group("Ui" FILES ${UI_FILES} ${WRAP_FILES} )
    #创建工程文件
add_executable(${PROJECT_NAME} ${SRC_FILES} ${HEAD_FILES} ${QRC_FILES} ${WRAP_FILES})
    #添加Qt5依赖项
target_link_libraries(${PROJECT_NAME} Qt5::Widgets Qt5::Core Qt5::Gui)
# set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLODER "CMakeTargets")
set_target_properties(RedMudStoveSvg PROPERTIES FOLDER "folder")